import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";



//新增边界样本
export function addSample(data) {
  return request({
    url: '/acsample/add',
    method: 'post',
    data: data
  })

  
}

//查询边界样本
export function selectSample(pageNum, pageSize) {
  return request({
    url: '/acsample/list',
    method: 'get',
    params: {  // GET请求使用params
      pageNum: pageNum,  // 动态接收pageNum
      pageSize: pageSize // 动态接收pageSize
    }
  })
}

//查询边界样本
export function selectSampleByNameTime(pageNum,pageSize,sampleCode,timeStar,timeEnd) {
  return request({
    url: '/acsample/list/ByNameByTime',
    method: 'get',
    params: {  // GET请求使用params
      pageNum: pageNum,  // 动态接收pageNum
      pageSize: pageSize, // 动态接收pageSize
      sampleCode: sampleCode,     
      timeStar:timeStar,
      timeEnd:timeEnd,
    }
  })
}

//导出边界样本
export function sampleExport() {
  return request({
    url: '/acsample/export',
    method: 'post',
    responseType: 'blob',
  })
}

// 删除边界样本
export function delSample(Id) {
  return request({
    url: '/acsample/del/'+Id,
    method: 'delete'
  })
}

//获得过期临期
export function querySampleEndTime() {
  return request({
    url: '/acsample/endTime/',
    method: 'get'
  })
}

// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/acsample/deptTree',
    method: 'get'
  })
}